#ifndef __SNIFFDUMP_HPP__
#define __SNIFFDUMP_HPP__

#include <string>
#include <iostream>

#include "pcap.h"

#include "Packet.hpp"

class SniffDump {
	private:
		pcap_t *Handle;
		int DataLink;
		
		SniffDump(const SniffDump &Other);
		SniffDump& operator=(const SniffDump &Other);
	
	public:

		/**
		 * given a PCAP file, open it and read the header
		 * @param Filename filename
		 */
		SniffDump(const std::string &Filename);

		virtual ~SniffDump();

		/**
		 * @param ResultPacket in this parameter the next packet from the packet dump is returned
		 * @returns true if another packet was returned, false if no more packets are contained in dump
		 */
		bool Next(Packet &ResultPacket);
};
#endif

